<template>
  <div>
    <h1>正常人数{{ $store.state.couter }} ==> 期望人数{{ $store.getters.chengfashuxing }}</h1>

    <el-button type="primary" @click="getList()">获取值</el-button>

    <el-button type="primary" @click="add()">增加一个人数</el-button>
  </div>
</template>

<script>
export default {
  name: 'TesT',
  data() {
    return {

    }
  },
  methods: {
    getList() {
      console.log("进入了getList方法")
      this.axios.get('http://localhost:9201/user').then((resp) => {
        console.log("成功调用了后端方法", resp)
      })
    },
    add() {
      this.$store.commit("zengjiajia", 5);
    }

  }

}
</script>